﻿using System;
using System.Data;
using System.Data.Common;
using Liger.Common;
using Liger.Data;

namespace EasyFMS.Model
{

	/// <summary>
	/// 实体类vLog
	/// </summary>
	[Serializable]
	public class vLog : Entity 
	{ 
		 public vLog() 
            : base("vLog") 
        { 

        }


		#region Model
		private int _UID;
		private string _ErrorLevel;
		private string _HostName;
		private string _IPAddress;
		private int _UserID;
		private string _ModuleName;
		private string _ModuleVerb;
		private string _MsgSrc;
		private string _MsgDsc;
		private DateTime _StartTime;
		private string _UserCode;
		private string _UserName;
	 
		/// <summary>
		/// 
		/// </summary>
		public int UID
		{
			get{ return _UID; }
			set
			{
				this.OnPropertyValueChange(_.UID,_UID,value);
				this._UID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ErrorLevel
		{
			get{ return _ErrorLevel; }
			set
			{
				this.OnPropertyValueChange(_.ErrorLevel,_ErrorLevel,value);
				this._ErrorLevel = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string HostName
		{
			get{ return _HostName; }
			set
			{
				this.OnPropertyValueChange(_.HostName,_HostName,value);
				this._HostName = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string IPAddress
		{
			get{ return _IPAddress; }
			set
			{
				this.OnPropertyValueChange(_.IPAddress,_IPAddress,value);
				this._IPAddress = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int UserID
		{
			get{ return _UserID; }
			set
			{
				this.OnPropertyValueChange(_.UserID,_UserID,value);
				this._UserID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModuleName
		{
			get{ return _ModuleName; }
			set
			{
				this.OnPropertyValueChange(_.ModuleName,_ModuleName,value);
				this._ModuleName = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModuleVerb
		{
			get{ return _ModuleVerb; }
			set
			{
				this.OnPropertyValueChange(_.ModuleVerb,_ModuleVerb,value);
				this._ModuleVerb = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string MsgSrc
		{
			get{ return _MsgSrc; }
			set
			{
				this.OnPropertyValueChange(_.MsgSrc,_MsgSrc,value);
				this._MsgSrc = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string MsgDsc
		{
			get{ return _MsgDsc; }
			set
			{
				this.OnPropertyValueChange(_.MsgDsc,_MsgDsc,value);
				this._MsgDsc = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public DateTime StartTime
		{
			get{ return _StartTime; }
			set
			{
				this.OnPropertyValueChange(_.StartTime,_StartTime,value);
				this._StartTime = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string UserCode
		{
			get{ return _UserCode; }
			set
			{
				this.OnPropertyValueChange(_.UserCode,_UserCode,value);
				this._UserCode = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string UserName
		{
			get{ return _UserName; }
			set
			{
				this.OnPropertyValueChange(_.UserName,_UserName,value);
				this._UserName = value;
			}
		}
		#endregion

		#region Method
		/// <summary>
		/// 获取列信息
		/// </summary>
		public override Field[] GetFields()
		{
			return new Field[] {
				_.UID,
				_.ErrorLevel,
				_.HostName,
				_.IPAddress,
				_.UserID,
				_.ModuleName,
				_.ModuleVerb,
				_.MsgSrc,
				_.MsgDsc,
				_.StartTime,
				_.UserCode,
				_.UserName
			};
		}
		/// <summary>
		/// 获取值信息
		/// </summary>
		public override object[] GetValues()
		{
			return new object[] {
				_UID,
				_ErrorLevel,
				_HostName,
				_IPAddress,
				_UserID,
				_ModuleName,
				_ModuleVerb,
				_MsgSrc,
				_MsgDsc,
				_StartTime,
				_UserCode,
				_UserName
			};
		} 
		/// <summary>
		/// 设置字段值
		/// </summary>
		public override void SetValue(string fieldName, object value)
        {
            switch (fieldName)
            { 
				case "UID":
                    this._UID = DataHelper.ConvertValue<int>(value);
                    break; 
				case "ErrorLevel":
                    this._ErrorLevel = DataHelper.ConvertValue<string>(value);
                    break; 
				case "HostName":
                    this._HostName = DataHelper.ConvertValue<string>(value);
                    break; 
				case "IPAddress":
                    this._IPAddress = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserID":
                    this._UserID = DataHelper.ConvertValue<int>(value);
                    break; 
				case "ModuleName":
                    this._ModuleName = DataHelper.ConvertValue<string>(value);
                    break; 
				case "ModuleVerb":
                    this._ModuleVerb = DataHelper.ConvertValue<string>(value);
                    break; 
				case "MsgSrc":
                    this._MsgSrc = DataHelper.ConvertValue<string>(value);
                    break; 
				case "MsgDsc":
                    this._MsgDsc = DataHelper.ConvertValue<string>(value);
                    break; 
				case "StartTime":
                    this._StartTime = DataHelper.ConvertValue<DateTime>(value);
                    break; 
				case "UserCode":
                    this._UserCode = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserName":
                    this._UserName = DataHelper.ConvertValue<string>(value);
                    break; 
            }
        }
		/// <summary>
		/// 获取字段值
		/// </summary>
        public override object GetValue(string fieldName)
        {
            switch (fieldName)
            { 
				case "UID":
                    return this._UID; 
				case "ErrorLevel":
                    return this._ErrorLevel; 
				case "HostName":
                    return this._HostName; 
				case "IPAddress":
                    return this._IPAddress; 
				case "UserID":
                    return this._UserID; 
				case "ModuleName":
                    return this._ModuleName; 
				case "ModuleVerb":
                    return this._ModuleVerb; 
				case "MsgSrc":
                    return this._MsgSrc; 
				case "MsgDsc":
                    return this._MsgDsc; 
				case "StartTime":
                    return this._StartTime; 
				case "UserCode":
                    return this._UserCode; 
				case "UserName":
                    return this._UserName; 
				default :
                    return null;
            } 
        }



		#endregion

		#region _Field
		/// <summary>
		/// 字段信息
		/// </summary>
		public class _
		{
			/// <summary>
			/// * 
			/// </summary>
			public readonly static Field All = new Field("*","vLog");
 
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UID = new Field("UID","vLog","UID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ErrorLevel = new Field("ErrorLevel","vLog","ErrorLevel");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field HostName = new Field("HostName","vLog","HostName");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IPAddress = new Field("IPAddress","vLog","IPAddress");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserID = new Field("UserID","vLog","UserID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModuleName = new Field("ModuleName","vLog","ModuleName");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModuleVerb = new Field("ModuleVerb","vLog","ModuleVerb");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field MsgSrc = new Field("MsgSrc","vLog","MsgSrc");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field MsgDsc = new Field("MsgDsc","vLog","MsgDsc");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field StartTime = new Field("StartTime","vLog","StartTime");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserCode = new Field("UserCode","vLog","UserCode");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserName = new Field("UserName","vLog","UserName");
		}
		#endregion

 
	}
}

